<html lang="zh-CN" style="font-size: 55.2px;" class="translated-ltr">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0">
    <meta name="full-screen" content="yes">
    <meta name="browsermode" content="application">
    <link rel="icon" href="favicon.ico">
    <title>Welcome Indeed Mall</title>
    <link rel="stylesheet" href="/statics/css/base.css">
    <link href="/statics/css/chunk-vendors.c3991080.css" rel="stylesheet">
    <link href="/statics/css/app.bad77f0c.css" rel="stylesheet">
    <link rel="stylesheet" type="text/css" href="/statics/css/chunk-00b94340.03560cb0.css">
       <link rel="stylesheet" href="/static/index/css/common.css">
    <script src="/static/jquery-3.5.0.min.js"></script>
    <script src="/static/layer/layer.js"></script>
</head>

<body class="">
    <style>
        #loadingContainer {
            position: fixed;
            width: 100%;
            height: 100%;
            z-index: 999999;
            background: #ffffff;
            display: none;
        }
    </style>
    <div id="loadingContainer" style="display: none;">
        <div style="display: flex;align-items: center;justify-content: center;height: 100%;"><span>
                <font style="vertical-align: inherit;">
                    <font style="vertical-align: inherit;">Cargado.</font>
                </font>
            </span></div>
    </div>
    <div id="app">
        <div data-v-7f828617="" class="login-pws-main">
            <div data-v-653af513="" data-v-7f828617="" class="com-nav"><i data-v-653af513=""
                    class="leftIcon van-icon van-icon-arrow-left" style="font-size: 22px;" onclick="history.go(-1)">
                    <!---->
                </i>
                <div data-v-653af513="" class="title">
                    <font style="vertical-align: inherit;">
                        <font style="vertical-align: inherit;">Restablecer contraseña de inicio de sesión</font>
                    </font>
                </div>
            </div>
            <div data-v-7f828617="" class="main">
                <div data-v-7f828617="" class="van-cell-group van-cell-group--inset van-hairline--top-bottom">
                    <div data-v-7f828617="" class="van-cell van-field">
                        <div class="van-cell__value van-cell__value--alone van-field__value">
                            <div class="van-field__body"><input type="password" placeholder="Contraseña antigua"
                                    class="van-field__control" name="o_pass" maxlength="100" step="" enterkeyhint="done" autocomplete="off"></div>
                        </div>
                    </div>
                    <div data-v-7f828617="" class="van-cell van-field">
                        <div class="van-cell__value van-cell__value--alone van-field__value">
                            <div class="van-field__body"><input type="password" placeholder="Nueva contraseña" name="n_pass" maxlength="140" step="" enterkeyhint="done" autocomplete="off"
                                    class="van-field__control"></div>
                        </div>
                    </div>
                    <div data-v-7f828617="" class="van-cell van-field">
                        <div class="van-cell__value van-cell__value--alone van-field__value">
                            <div class="van-field__body"><input type="password" placeholder="Confirmar contraseña"
                                    class="van-field__control" name="c_pass" maxlength="140" step="" enterkeyhint="done" autocomplete="off"></div>
                        </div>
                    </div>
                </div>
                <div data-v-7f828617="" class="blue-btn" style="margin-top: 20px;"><span data-v-7f828617="" class="save">
                        提交
                    </span></div>
            </div>
        </div>
    </div>
</body>
<script src="/static/jquery.cookie.js"></script>

<script>
  $(function () {
    if ($.cookie("captcha")) {
      var count = $.cookie("captcha");
      $('#Send').text("(" + count + ")S").removeClass("active");
      var resend = setInterval(function () {
        count--;
        if (count > 0) {
          $('#Send').text("(" + count + ")S").removeClass("active");
          $.cookie("captcha", count, {path: '/', expires: (1 / 86400) * count});
        } else {
          clearInterval(resend);
          $('#Send').text("Send").addClass("active");
        }
      }, 1000);
    }

    $(document).on("click", ".active", function () {
      var type = 2;
      if (type){
        layer.load(2);
        $.ajax({
          url: "{:Url('sms_code')}",
          type: "post",
          traditional: true,
          data: {type:type},
          success: function (e) {
            layer.closeAll('loading');
            if (e.code === 1) {
              layer.msg(e.msg);
              var btn = $(this);
              var count = 10;
              var resend = setInterval(function () {
                count--;
                if (count > 0) {
                  $('#Send').text("(" + count + ")S").attr('disabled', true);
                  $('#Send').removeClass("active");
                  $.cookie("captcha", count, {path: '/', expires: (1 / 86400) * count});
                } else {
                  clearInterval(resend);
                  $('#Send').text("Send").addClass("active");
                }
              }, 1000);
              btn.attr('disabled', true).css('cursor', 'not-allowed');
            } else {
              layer.msg(e.msg, function () {
                return false;
              });
            }
          },
        });
      }else {
        layer.msg('El número de teléfono no puede estar vacío', function(){
        });
      }
    });
  });
</script>

<script>
  $(document).on("click", ".save", function () {
    var o_pass = $("input[ name='o_pass']").val();
    var n_pass = $("input[ name='n_pass']").val();
    var c_pass = $("input[ name='c_pass']").val();
    if (n_pass !== c_pass){
      layer.msg('Dos contraseñas inconsistentes', function () {
        return false;
      });
    }else {
      layer.load(2);
      $.ajax({
        url: "{:Url('password')}",
        type: "post",
        traditional: true,
        data: {o_pass:o_pass,n_pass: n_pass,c_pass:c_pass},
        success: function (e) {
          layer.closeAll('loading');
          if (e.code === 1) {
            layer.msg(e.msg, {
              time: 2000,
              end: function () {
                location.reload();
              }
            });
          } else {
            layer.msg(e.msg, function () {
              return false;
            });
          }
        },
      });
    }

  });
</script>
</html>